/**
 * 
 */
package recognition.preprocessor;

import utility.math.Translation;
import utility.math.Vector2D;
import handwritten.gesture.MultiGesture;
/**
 * @author tioz
 *
 */
public class setCOMPosition extends Preprocessor {

	Vector2D position;
	
	public setCOMPosition(Vector2D v)
	{
		position =v;
	}
	/* (non-Javadoc)
	 * @see recognition.preprocessor.Preprocessor#preprocess(handwritten.gesture.MultiGesture)
	 */
	@Override
	protected boolean preprocess(MultiGesture gest) {
		
		gest.transform(new Translation(position.minus(gest.centerOfMass())));
		return true;
	}

}
